import * as constants from "./constants";
import axios from "axios";
export const changeDetailInfo=(data)=>({
type:constants.CHANGE_DETAIL,
data

})
export const getDetailInfo = (id) => {
    return (dispatch) => {
      axios.get("/api/detail.json?id="+id).then((res) => {
        console.log(res.data.data);
        dispatch(changeDetailInfo(res.data.data));
      });
    };
  };